home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / setwaitjobpid.z / setwaitjobpid
Encoding:
Text File  |  2002-10-03  |  4.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. sssseeeettttwwwwaaaaiiiittttjjjjoooobbbbppppiiiidddd((((2222))))                                              sssseeeettttwwwwaaaaiiiittttjjjjoooobbbbppppiiiidddd((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      setwaitjobpid - set a process to retrieve job information with waitjob
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh>>>>
  13.  
  14.      iiiinnnntttt sssseeeettttwwwwaaaaiiiittttjjjjoooobbbbppppiiiidddd((((jjjjiiiidddd____tttt rrrrjjjjiiiidddd,,,, ppppiiiidddd____tttt wwwwppppiiiidddd))))
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function sets a job to wait for a specified process to
  18.      call _wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb.  If a job is set to wait for a process, it remains a zombie
  19.      after job termination until either the process _w_p_i_d calls _wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb or the
  20.      process _w_p_i_d terminates. The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function takes two arguements:
  21.      _r_j_i_d, the job id of the job to be set to wait and _w_p_i_d, the process id of
  22.      the process that is expected to call _wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb. The _w_p_i_d parameter cannot
  23.      be the process calling the _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function.  If an _r_j_i_d of 0 is
  24.      specified, the job of the calling process is used.
  25.  
  26.      The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function checks the specified pid's process for the
  27.      CAP_SETUID capability. If called for another job, the _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd
  28.      function checks for CAP_MAC_WRITE and CAP_PROC_MGT capability.  See the
  29.      capability(4) and capabilities(4) man pages for more information on the
  30.      capability mechanism that provides fine grained control over the
  31.      privileges of a process.
  32.  
  33.      The _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd function returns 0 if successful.
  34.  
  35. EEEERRRRRRRROOOORRRRSSSS
  36.      Under the following conditions, the function _ssss_eeee_tttt_wwww_aaaa_iiii_tttt_jjjj_oooo_bbbb_pppp_iiii_dddd sets _e_r_r_n_o to:
  37.  
  38.      [ENOPKG]       The job limits software is not installed.
  39.  
  40.      [EINVAL]       _w_p_i_d is the pid of the calling process or _r_j_i_d is the jid
  41.                     of the job which _w_p_i_d belongs.
  42.  
  43.      [ESRCH]        The process _w_p_i_d does not exist.
  44.  
  45.      [EPERM]        If calling process or entered pid do not have capability.
  46.  
  47.      [ENOJOB]       The job _r_j_i_d does not exist.
  48.  
  49. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  50.      systune(1M), getjlimit(2), setjlimit(2), getjusage(2), makenewjob(2),
  51.      killjob(2), waitjob(2).
  52.  
  53. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  54.      Upon successful completion, _s_e_t_w_a_i_t_j_o_b_p_i_d returns 0.  If an error occurs,
  55.      a value of -1 is returned and eeeerrrrrrrrnnnnoooo is set to indicate the error.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.